<template>
    <!-- 设置弹窗DOM -->
    <div id="popup" class="ol-popup">
        <div id="popup-content">
            <slot></slot>
     </div>
    </div>

</template>

<script setup>
</script>

<style scoped>
/* 插槽相关 */
.ol-popup {
  position: absolute;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 300px;
  z-index: 100;
}

.ol-popup:after, .ol-popup:before {
  top: 100%; 
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}
.ol-popup:after {
  border-top-color: white; 
  border-width: 10px;
  left: 10px; 
  margin-left: 0; 
}

.ol-popup:before {
  border-top-color: #cccccc; 
  border-width: 11px;
  left: 9px; 
  margin-left: 0;
}

.ol-popup-content {
    display: flex;
    align-items: center;
}

</style>